@ApiProtocol(cPlusNamespace="${database.nameSpace}::dao", needInit=true)
class ${database.apiName}
{
 <#list database.tables as table>
	@Member(cPlusNamespace="${database.nameSpace}::ddo", desc="查询${table.description}过滤条件")
	class TQuery${table.ddoName}Filter
	{
		@Field(desc="version", defaultValue="0")
		uint32_t version;
		
		<#list table.fields as field>
			<#if field.bQuery >
			
		@Field(desc="${field.description}")
		${field.type.typeName} ${field.fieldName};
			<#if field.type.needUFlag>
		@Field(desc="${field.description}标志")
		uint8_t ${field.fieldName}_u;
			</#if>
			</#if>
		</#list>
		
		@Field(desc="page 页码")
		uint32_t page;
		
		@Field(desc="count 每页包含的个数")
		uint32_t count;
	}
	
	@Member(cPlusNamespace="${database.nameSpace}::ddo", desc="查询${table.description}结果")
	class T${table.ddoName}Ddo
	{
		@Field(desc="version", defaultValue="0")
		uint32_t version;
		
		<#list table.fields as field>
			@Field(desc="${field.description}")
			${field.type.typeName} ${field.fieldName};
			
		</#list>
	}
	
	@ApiProtocol(cmdid="${table.queryApiCmdId}", desc="查询${table.description}")
	class Query${table.ddoName}
	{
		class Req{
			@Field(desc="查询过滤条件")
			TQuery${table.ddoName}Filter queryFilter;
		}
		
		class Resp{
			@Field(desc="结果信息描述")
			String resultMsg;
			
			@Field(desc="查询结果集")
			Vector<T${table.ddoName}Ddo> queryResult;
		}
	}
</#list>
}
